import { request } from '@/utils/index'

const articlrGetChannelList = () => request.get('/channels')

const articlePublishArticle = (data) => request.post('/mp/articles?draft=false', data)

const articleGetArticleList = (queryData) => request.get('/mp/articles', { params: queryData })

const articleDeleteArticle = (id) => request.delete(`/mp/articles/${id}`)

const articleGetArticleDetail = (id) => request.get(`/mp/articles/${id}`)

const articleUpdateArticle = (id, articleData) => request.put(`mp/articles/${id}`, articleData)
export {
  articlrGetChannelList,
  articlePublishArticle,
  articleGetArticleList,
  articleDeleteArticle,
  articleGetArticleDetail,
  articleUpdateArticle
}
